<html>
<head>
<title>Form submission</title>
<script type="text/javascript" src="/shared/scripts/testcase.js">
</script>
<script type="text/javascript">
if (window.addEventListener) {
	window.addEventListener('load', f, false);
} else if (window.attachEvent) {
	window.attachEvent('onload', f);
} else {
	window.onload = f;
}
function f() {
	var tc = new TestCase();
	var output_data = document.getElementById("output_data").innerHTML;
	// make a fake XHR obj
	var xhr = new Object();
	xhr.responseText = output_data;
	tc.client_id = "%(client_id)s";
	tc.testcase_url = "%(testcase_url)s";
	tc.input = "%(input)s";
	tc.output = document.getElementById("output_data").innerHTML;
	tc.description = "%(description)s";
	tc.expected_result = "%(expected_result)s";
	%(test_func)s
}
</script>
<body>
<textarea id="output_data">%(output)s</textarea>
</body>
</html>